package com.hp.service.impl;

import com.hp.dao.AdminDao;
import com.hp.entity.Admin;
import com.hp.service.IAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: LiuQiang
 * @Date: 2021/10/22 23:07
 */
@Service
public class AdminServiceImpl implements IAdminService {

    @Autowired
    private AdminDao adminDao;

    @Override
    public Admin adminLogin(String userName, String passWord) {
        return adminDao.adminLogin(userName,passWord);
    }

    @Override
    public List<Admin> findAllAdmins() {
        return adminDao.findAllAdmins();
    }

    @Override
    public int adminSave(Admin admin) {
        return adminDao.adminSave(admin);
    }

    @Override
    public int findAdminsByIdDelete(Integer id) {
        return adminDao.findAdminsByIdDelete(id);
    }

    @Override
    public int resetPassWord(Integer id) {
        return adminDao.resetPassWord(id);
    }
}
